#ifndef QCONFIGPROCESS_H_
#define QCONFIGPROCESS_H_

#include <QObject>
#include <QMap>
struct st_index
{
    uchar groupIndex;
    uchar paramlistIndex;
    uchar selectIndex;
    uchar rsv;
};

typedef union _paramIndex
{
    int i32Index;
    struct st_index _st_index;


}un_paramIndex;

//参数设置
typedef struct _selectItem
{
    QString sName;//参数名称
    int i32Value;
}st_selectItem;

//参数设置
typedef struct _paramInfo
{
    QString sParamName;//参数名称
    int i32MaxValue;//最大值
    int i32MinValue;//最小值
    int i32CurrentValue=-1;//当前设定值
    int i32CmdId;//命令字
    bool bSetOk;//是否设置成功

    QList<st_selectItem> selectlist;//属性值选择
}st_paramInfo;


typedef struct _parmGroup
{
    QString sGroupName;
    QList<st_paramInfo> paramlist;
}st_parmGroup;


typedef struct devConfigInfo
{
    QString sIPAddress;
    QString sDevName;
    QString sSendPort;
    QString sRcvPort;
}tDevConfigInfo;

class QConfigProcess : public QObject
{
    Q_OBJECT
public:
    explicit QConfigProcess(QObject *parent = nullptr);

    bool getDevConfig();
    bool getAttrConfig();
signals:

public slots:

public:
    QString m_sDevConfigPath;
    QString m_sAttrConfigPath;

    QMap<int,tDevConfigInfo> m_tDevConfigParamMap;

    QList<st_parmGroup> m_st_parmGroup;
};

#endif // QPLATFORMCONFIG_H
